<div class="col-md-10 col-md-offset-1">
	<form class="class="form-horizontal" role="form"" method="POST" action="/" id="message-form">
	    <div class="form-group">
	        <div class="row">
	            <div class="col-md-11 col-sm-9 col-xs-9">
		          <textarea class="form-control" rows="2" placeholder="Nhập nội dung tại đây" id="m-content"></textarea>
		        </div>
		        <div class="col-md-1 col-sm-3 col-xs-3">
		            <button class="btn btn-primary btn-lg" id="btn-send">Gửi</button>
		        </div>
	        </div>
	        
	    </div>
	</form>
</div> 

<script type="text/javascript">
	$(document).ready(function(){
		$("#message-form").submit(function(e){
			e.preventDefault();
			var content = $("#m-content").val();
			var pid = <?php echo $project->id;?>;
			$.ajax({
				type: "POST",
	            url: BASE_URL + "index.php/project/addProjectMessage",
	            data: ({project_id: pid,m_content:content}),
	            success: function(respond){
	        	   var kq = $.parseJSON(respond);
	        	   if(kq['status'] == "success"){
	        	   $('#show-project-message').load("<?php echo base_url()."index.php/project/showProjectMessage/".$project->id?>");
	        	   }
	            }
				
			});// end ajax
		});
	});
</script>          